package com.test.mooan.labama.bean_boom.config_info_boom;

import static com.test.mooan.labama.constants_boom.Constant_boom.*;

import com.test.mooan.labama.constants_boom.Url_boom;
import com.test.mooan.labama.utils_boom.Stringutil_boom;


public class CountryInfo_boom {

    private static class Inner {
        private static final CountryInfo_boom instance = new CountryInfo_boom();
    }

    private CountryInfo_boom() {}

    public static CountryInfo_boom gInstance() {
        return Inner.instance;
    }

    private String front;
    private String areaCode;

    public String gFront() {
        return Stringutil_boom.getSafeString(front);
    }

    public void sFront(String front) {
        this.front = "/"+ Stringutil_boom.getSafeString(front);
    }

    public void sAreaCode(String areaCode) {
        this.areaCode = areaCode;
    }

    public String gAreaCode() {
        return "+"+Stringutil_boom.getSafeString(areaCode);
    }

    public boolean isGhana(){
        return AreaCode_Ghana.endsWith(gAreaCode());
    }

    public boolean isCote(){
        return AreaCode_Cote.endsWith(gAreaCode());
    }

    public boolean isKenya(){
        return AreaCode_Kenya.endsWith(gAreaCode());
    }

    public boolean isUganda(){
        return AreaCode_Uganda.endsWith(gAreaCode());
    }

    public boolean isTanzan(){
        return AreaCode_Tanzan.endsWith(gAreaCode());
    }

    public boolean isCameroon(){
        return AreaCode_Cameroon.endsWith(gAreaCode());
    }

    public boolean isZambia(){
        return AreaCode_Zambia.endsWith(gAreaCode());
    }

    public boolean isSenegal(){
        return AreaCode_Senegal.endsWith(gAreaCode());
    }

    public boolean isCambodia(){
        return AreaCode_Cambodia.endsWith(gAreaCode());
    }

    public boolean isEnglish(){
        return isKenya()||isGhana()||isUganda()||isZambia();
    }

    public boolean isFrench(){
        return isCote()||isCameroon()||isSenegal();
    }

    public boolean isOrderRepayH5(){
        return !isGetOrderRepayH5();
    }

    public boolean isGetOrderRepayH5(){
        return isUganda()||isKenya();
    }

    public String gPrivacyPolicyUrl(){

        if (isGhana()) return Privacy_Policy_Url_Ghana;
        if (isCameroon()) return Privacy_Policy_Url_Cameroon;
        if (isCote()) return Privacy_Policy_Url_Cote;
        if (isSenegal()) return Privacy_Policy_Url_Senegal;
        if (isZambia()) return Privacy_Policy_Url_Zambia;
        if (isCambodia()) return Privacy_Policy_Url_Cambodia;

        return Privacy_Policy_Url_Uganda;

    }

    public String gBaseUrl(){
        if (isCambodia()) return Url_boom.Url_base_Cambodia;
        return Url_boom.Url_base;
    }

}
